//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
#ifndef TERMINAL_PROP_CLASSES_HPP
#define TERMINAL_PROP_CLASSES_HPP

//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
#ifndef WBTWIZ_PROP_CLASSES_HPP
#define WBTWIZ_PROP_CLASSES_HPP

#include "PropClasses.hpp"

class CGenericPropSheet;
class TsWbtWizard;

class CGenericPropPage : public CPropPage
{
public:
	CGenericPropPage (CGenericPropSheet *pOwner = NULL);
	~CGenericPropPage();

	CGenericPropSheet & GetOwner();

	virtual BOOL LoadPage();
	virtual BOOL UnloadPage();

	virtual BOOL WriteRegistrySettings() = 0;
	virtual BOOL ReadRegistrySettings() = 0;
	virtual BOOL Validate() = 0;
	virtual BOOL StoreData() = 0;

	BEGIN_MSG_MAP(CGenericPropPage)
		CHAIN_MSG_MAP (CPropPage)
	END_MSG_MAP()
protected:
	TsWbtWizard *m_pWbtWiz;
};


class CGenericPropSheet : public CPropSheet
{
public:
	CGenericPropSheet (HINSTANCE hInstance, HWND hwndParent, TsWbtWizard *pWbtWiz, LPCTSTR szTitle);
	CGenericPropSheet (HINSTANCE hInstance, HWND hwndParent, LPCTSTR szTitle);
	~CGenericPropSheet();
	
	BOOL GetReboot();

	BOOL GetDefaults();

	BOOL GetWizardFlag();
	
	virtual void OnKillActivePage(CPropPage *pPage); 
	
	void SetReboot (BOOL bReboot);

	void SetDefaults (BOOL bDefault);

	void SetWizFlags (DWORD dwFlags)
	{
		CPropSheet::SetWizFlags (dwFlags);		
	}

	TsWbtWizard *GetWbtWiz()
	{
		return m_pWbtWiz;
	}

	virtual void WriteSettings();
private:
	TsWbtWizard *m_pWbtWiz;
	BOOL m_bSetDefaults;
	BOOL m_bReboot;
	BOOL m_bWizardFlag;
};


typedef CGenericPropSheet CTerminalPropSheet;
typedef CGenericPropSheet CWbtWizPropSheet;

typedef CGenericPropPage CTerminalPropPage;
typedef CGenericPropPage CWbtWizPropPage;


#endif //TERMINAL_PROP_CLASSES_HPP
#endif//WBTWIZ_PROP_CLASSES_HPP


